home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 2 / Apprentice-Release2.iso / Source Code / C / Applications / MacGS 2.5.2ß3 / (MacGSLib.π) / gp_macui.h < prev    next >
Encoding:
C/C++ Source or Header  |  1993-04-17  |  3.1 KB  |  134 lines  |  [TEXT/R*ch]

  1. #ifndef _H_gp_macui_
  2. #define _H_gp_macui_
  3.  
  4. /* Copyright (C) 1993 Aladdin Enterprises.  All rights reserved.
  5.    Distributed by Free Software Foundation, Inc.
  6.  
  7. This file is part of Ghostscript.
  8.  
  9. Ghostscript is distributed in the hope that it will be useful, but
  10. WITHOUT ANY WARRANTY.  No author or distributor accepts responsibility
  11. to anyone for the consequences of using it or for whether it serves any
  12. particular purpose or works at all, unless he says so in writing.  Refer
  13. to the Ghostscript General Public License for full details.
  14.  
  15. Everyone is granted permission to copy, modify and redistribute
  16. Ghostscript, but only under the conditions described in the Ghostscript
  17. General Public License.  A copy of this license is supposed to have been
  18. given to you along with Ghostscript so you can know your rights and
  19. responsibilities.  It should be in a file named COPYING.  Among other
  20. things, the copyright notice and this notice must be preserved on all
  21. copies.  */
  22.  
  23.  
  24. typedef void (*GUIInit)            (MenuHandle hGUIMenu, short menuOffset);
  25. typedef void (*GUINoArgFunc)    (void);
  26. typedef void (*GUIMenu)            (short menuItem);
  27. typedef void (*GUIActivate)        (Boolean fDoActive, CWindowPtr windowPtr);
  28. typedef void (*GUIUpdate)        (CWindowPtr windowPtr);
  29. typedef void (*GUIEvent)        (EventRecord *pEvent);
  30. typedef char (*GUIOptionsProc)    (short actionValue);
  31.  
  32.  
  33. typedef struct
  34. {
  35.     void (*DoInit)            (MenuHandle hGUIMenu, short menuOffset);
  36.     void (*DoCursor)        (void);
  37.     void (*DoCut)            (void);
  38.     void (*DoCopy)            (void);
  39.     void (*DoPaste)            (void);
  40.     void (*DoClear)            (void);
  41.     void (*DoMenu)            (short menuItem);
  42.     void (*DoActivate)        (Boolean fDoActive, CWindowPtr windowPtr);
  43.     void (*DoUpdate)        (CWindowPtr windowPtr);
  44.     void (*DoMouseDown)        (EventRecord *pEvent);
  45.     void (*DoKeyEvent)        (EventRecord *pEvent);
  46.     void (*DoConsolePuts)    (void);
  47.     void (*DoOpenFilePre)    (void);
  48.     void (*DoOpenFilePost)    (void);
  49.     char (*DoOptionsProc)    (short actionValue);
  50.     void (*DoTerminate)        (void);
  51.  
  52. } GUIProcRec, *GUIProcPtr;
  53.  
  54.  
  55. #define GUI_MAGIC_NUMBER    'mGUI'
  56.  
  57.  
  58. enum OptionsProcEnum
  59. {
  60.     kNoOptions       = 0x00,
  61.     kHaveOptions   = 0x01,
  62.     kIsIllegalDrvr = 0x02,
  63.  
  64.     __kLastOptionsProcEnum__
  65. };
  66.  
  67.  
  68. /* Define Macintosh GUI devices */
  69.  
  70. typedef struct gx_device_macui
  71. {
  72.     gx_device_common;
  73.  
  74.     long        magicNumber;    /*    GUI_MAGIC_NUMBER    */
  75.     GUIProcPtr    pGUIProcs;        /*    GUI interface procs    */
  76.  
  77. } gx_device_macui;
  78.  
  79.  
  80. extern short         macOpenGUIDriver (const char *devName);
  81. extern short        doRunIndString    (short index);
  82. extern short        doRunString (char *pStr);
  83. extern void            SetDoMacOpenFile (Boolean fFlag);
  84. extern Boolean        GetDoMacOpenFile (void);
  85. extern char           *CfromPStr (char *pCstr, char *pPstr);
  86. extern pascal void    drawOutline (WindowPtr dialog, short item);
  87. extern GUIProcPtr    FindGUIProcs (const char *devName);
  88.  
  89.  
  90. enum
  91. {
  92.     AppleMenuID = 1,
  93.     FileMenuID,
  94.     EditMenuID,
  95.     MacGSMenuID = -128
  96. };
  97.  
  98. #define GUIMenuID        MacGSMenuID
  99.  
  100. enum
  101. {
  102.     iUndo  = 1,
  103.     __iEditLine1,
  104.     iCut,
  105.     iCopy,
  106.     iPaste,
  107.     iClear
  108. };
  109.  
  110. enum
  111. {
  112.     iAboutMacGS = 1,
  113.     _iMacUILine1,
  114.     iOpenFile,
  115.     _iMacUILine2,
  116.     iConfigure,
  117.     iLaserPrep,
  118.     _iMacUILine3,
  119.  
  120.     __iLastMacGSUIMenuItem__
  121. };
  122.  
  123. enum actionValue
  124. {
  125.     iInitDialogAction,
  126.     iDoDialogAction,
  127.     iCommitAction,
  128.     iRetractAction,
  129.  
  130.     __iLastActionValue__
  131. };
  132.  
  133.  
  134. #endif /* _H_gp_macui_ */